<?php
// +----------------------------------------------------------------------
// | Author: 黄柯柯 keke.huang@ostengar.com>
// +----------------------------------------------------------------------
namespace app\util;

class RedisSelect
{

    /**
     * 读取详情
     * @param  int $object_id 来源表id
     * @param  string $name key的值
     * @return object 查询到的数据
     */
    public function getDetailByKey($name, $object_id)
    {
        $redis = new \Redis();
        $redis->connect('127.0.0.1', 6379);
        $data = $redis->get("$name:{$object_id}");

        return $data;
    }
}
